<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<title>信息管理</title>
<body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',border:false">
			<table id="grid"></table>
		</div>

		<div data-options="region:'east',split:true,border:false" style="width: 50%; padding: 5px;">
			<form id="form" name="form" method="post" class="form">
				<fieldset>
					<legend> 基本信息 </legend>
					<table class="table">
						<tbody>
							<tr>
								<th>类别编号</th>
								<td><input id="scId" name="scId" class="textbox" style="height: 22px;" /></td>
							</tr>
							<tr>
								<th>类别名称</th>
								<td><input name="className" class="textbox" style="height: 22px;" /></td>
							</tr>
							<tr>
								<th>类别描述</th>
								<td><input name="description" class="textbox" style="height: 22px;" /></td>
							</tr>
							<tr>
								<th>操作</th>
								<td><a id="operateMode_submit" class="easyui-linkbutton" data-options="iconCls:'ext-icon-accept',disabled:true">进入操作</a></td>
							</tr>
						</tbody>
					</table>
				</fieldset>
			</form>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			var gird;
			grid = $('#grid').treegrid({
				fit : true,
				border : false,
				collapsible : false,
				idField : 'scId',
				treeField : 'className',
				parentField : 'parentId',
				rownumbers : true,
				singleSelect : true,
				rownumbers : true,
				url : ctx + 'listSysClass.do?classtypeid=' + 1,
				columns : [ [ {
					field : 'scId',
					title : 'ID',
					width : 40
				}, {
					field : 'className',
					title : '类别名称',
					width : 150
				}, {
					field : 'description',
					title : '分类描述',
					width : '240'
				} ] ],
				onLoadSuccess : function(data) {
					$('.iconImg').attr('src', fw.pixel_0);
				},
				onClickRow : function(row) {
					$("#form").form("load", row);
					$("#operateMode_submit").linkbutton('enable');
				}
			});
			
			$("#operateMode_submit").click(function() {
				if( $("#scId").val().trim().length>0 ){
					window.location.href="artList.jsp?scId="+$("#scId").val();
				}else{
					$.messager.show({
						title : message.title.normal,
						msg : message.no_record,
						timeout : message.timeout,
						showType : message.showType
					});
				}
			});

		});
	</script>
</body>